<template>
  <div class="welfare">
    <div animation="animationData" style="background:red;height:100rpx;width:100rpx"></div>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        animationData: {}
      }
    },
    onShow(){
      this.animateFuc()
    },
    methods:{
      animateFuc(){
        var animation = wx.createAnimation({
          duration: 1000,
          timingFunction: 'ease',
        })

        this.animation = animation
        
        animation.scale(2,2).rotate(45).step()
        
        // this.setData({
        //   animationData:animation.export()
        // })
        
        setTimeout(()=> {
          animation.translate(30).step()
          // this.setData({
          //   animationData:animation.export()
          // })
        }, 1000)
      },
    }
  }
</script>

<style scoped>

</style>
